<div id="content">
    <fieldset>
        <legend>Update Personal Profile</legend><br/>
        <?php
        $attributes = array('id' => 'register_form');
        echo form_open('register/do_updateProfile', $attributes);
        $firstname = array(
            'name' => 'firstname',
            'id' => 'firstname',
            'class' => 'required',
            'size' => '28',
            'minlength' => '6',
            'value' => $this->session->userdata('name')
        );
        $lastname = array(
            'name' => 'lastname',
            'id' => 'lastname',
            'class' => 'required',
            'size' => '28',
            'value' => $this->session->userdata('last_name')
        );
        $contact = array(
            'name' => 'contact',
            'id' => 'contact',
            'class' => 'required',
            'size' => '28',
            'value' => $this->session->userdata('contact')
        );
        $email = array(
            'name' => 'email',
            'id' => 'email',
            'class' => 'required email',
            'size' => '28',
            'value' => $this->session->userdata('email')
        );
        ?>
        <table>
            <!--                user personal information fields-->
            <tr>
                <td colspan="3"><b>PERSONAL INFORMATION</b></td>
            </tr>
            <tr>
                <td>First Name</td>
                <td>*</td>
                <td><?php echo form_input($firstname); ?></td>
            </tr>
            <tr>
                <td>Last Name</td>
                <td>*</td>
                <td><?php echo form_input($lastname); ?></td>
            </tr>
            <tr>
                <?php
                if ($this->session->userdata('gender') == "Male") {
                    $true = "True";
                    $false = "False";
                }else{
                    $false = "True";
                    $true = "False";
                }
                ?>
                <td>Gender</td>
                <td></td>
                <td><?php echo form_radio('gender', 'Male', $true); ?><b>Male</b><?php echo form_radio('gender', 'Female', $false); ?><b>Female</b></td>
            </tr>
            <tr>
                <td class="required date"><label>Date of Birth</label></td>
                <td></td>
                <td><?php echo $formdate->selectDay() ?>
<?php echo $formdate->selectMonth() ?>
<?php echo $formdate->selectYear() ?>
                </td>
            </tr>
            <tr>
                <td>Country</td>
                <td>*</td>
                <td><?php echo form_dropdown('country', $country_list, $this->session->userdata('country')); ?></td>
            </tr>
            <tr>
                <td>Contact Number</td>
                <td>*</td>
                <td><?php echo form_input($contact); ?></td>
            </tr>
            <tr>
                <td>Email Address</td>
                <td>*</td>
                <td><?php echo form_input($email); ?></td>
            </tr>
            <tr>
                <td colspan="3"><?php $att = array('class' => 'submit');
                echo form_submit('profile_submit', 'Update', $att); ?> </td>
                    </tr>
                </table>
<?php echo form_close(); ?>

<?php echo validation_errors(); ?>
    </fieldset>
</div>
